/* ============================================
   KOÇ HOLDİNG ORGANİZASYON ŞEMASI - CSS
   Elementor uyumlu, responsive org chart
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --org-red: #539ae0;
  --org-red-dark: #4096ec;
  --org-bg: #f5f5f5;
  --org-card-bg: #ffffff;
  --org-text-dark: #1a1a1a;
  --org-text-gray: #666666;
  --org-line-color: #d1d1d1;
  --org-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --org-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --org-radius: 8px;
  --org-card-radius: 10px;
  --org-transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --org-line-width: 2px;
  --org-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---- Container ---- */
.org-chart-wrapper {
  background-color: var(--org-bg);
  padding: 60px 20px 80px;
  font-family: var(--org-font);
  overflow-x: auto;
}

.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 900px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* ---- Section Title ---- */
.org-chart-title {
  text-align: center;
  margin-bottom: 50px;
}

.org-chart-title h2 {
  font-family: var(--org-font);
  font-size: 36px;
  font-weight: 700;
  color: var(--org-text-dark);
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.org-chart-title p {
  font-size: 16px;
  color: var(--org-text-gray);
  margin: 0;
}

/* ---- Title Labels (Unvanlar) ---- */
.org-role-title {
  font-family: var(--org-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--org-red);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.org-role-title.sub-title {
  font-size: 13px;
  font-weight: 600;
  margin-top: 20px;
}

/* ---- Person Card ---- */
.org-card {
  background: var(--org-card-bg);
  border-radius: var(--org-card-radius);
  box-shadow: var(--org-shadow);
  border-bottom: 4px solid var(--org-red);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-width: 220px;
  max-width: 280px;
  cursor: pointer;
  transition: var(--org-transition);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.org-card:hover {
  box-shadow: var(--org-shadow-hover);
  transform: translateY(-3px);
  border-bottom-color: var(--org-red-dark);
}

.org-card:hover .org-card-name {
  color: var(--org-red);
}

.org-card-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8e8e8;
  border: 2px solid #f0f0f0;
}

.org-card-name {
  font-family: var(--org-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--org-text-dark);
  line-height: 1.35;
  transition: color 0.2s ease;
}

/* ---- Chairman (top level) ---- */
.org-level-chairman {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
  position: relative;
}

/* Vertical connector from chairman down */
.org-level-chairman::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--org-line-width);
  height: 40px;
  background: var(--org-line-color);
}

/* ---- Two main branches ---- */
.org-branches {
  display: flex;
  justify-content: center;
  gap: 0;
  width: 100%;
  margin-top: 40px;
  position: relative;
}

/* Horizontal connector line between left and right branch */
.org-branches::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: var(--org-line-width);
  background: var(--org-line-color);
}

/* ---- Left Branch (Denetim) ---- */
.org-branch-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 280px;
  position: relative;
  padding-top: 40px;
}

.org-branch-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--org-line-width);
  height: 40px;
  background: var(--org-line-color);
}

/* ---- Right Branch (CEO) ---- */
.org-branch-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 700px;
  position: relative;
  padding-top: 40px;
}

.org-branch-right::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--org-line-width);
  height: 40px;
  background: var(--org-line-color);
}

/* ---- Coordinator List (vertical stacked cards) ---- */
.org-coordinator-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  margin-top: 4px;
}

.org-coordinator-list .org-card {
  border-radius: 0;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: none;
  min-width: 240px;
}

.org-coordinator-list .org-card:first-child {
  border-radius: var(--org-card-radius) var(--org-card-radius) 0 0;
}

.org-coordinator-list .org-card:last-child {
  border-radius: 0 0 var(--org-card-radius) var(--org-card-radius);
  border-bottom: 4px solid var(--org-red);
}

.org-coordinator-list .org-card:only-child {
  border-radius: var(--org-card-radius);
  border-bottom: 4px solid var(--org-red);
}

.org-coordinator-list-wrapper {
  background: var(--org-card-bg);
  border-radius: var(--org-card-radius);
  box-shadow: var(--org-shadow);
  overflow: hidden;
}

.org-coordinator-list-wrapper .org-card {
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid #f0f0f0;
}

.org-coordinator-list-wrapper .org-card:last-child {
  border-bottom: 4px solid var(--org-red);
}

.org-coordinator-list-wrapper .org-card:hover {
  box-shadow: none;
  transform: none;
  background: #fafafa;
}

/* ---- Sub-section block (CEO altı) ---- */
.org-sub-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
  position: relative;
}

.org-sub-section::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--org-line-width);
  height: 24px;
  background: var(--org-line-color);
}

/* ---- CEO sub-grid (CFO, Direktörler, Koordinatörler side-by-side) ---- */
.org-ceo-subs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

/* ---- Group section (Grup Başkanları) ---- */
.org-group-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 28px;
  position: relative;
  width: 100%;
}

.org-group-section::before {
  content: '';
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--org-line-width);
  height: 28px;
  background: var(--org-line-color);
}

/* ---- Functional Directors row ---- */
.org-directors-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
  width: 100%;
}

.org-director-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* ---- Generic vertical connector ---- */
.org-vline {
  width: var(--org-line-width);
  height: 24px;
  background: var(--org-line-color);
  margin: 0 auto;
}

.org-vline.short {
  height: 16px;
}

.org-vline.long {
  height: 36px;
}

/* ---- Placeholder photo ---- */
.org-card-photo-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #999;
  border: 2px solid #f0f0f0;
}

.org-card-photo-placeholder::after {
  content: '👤';
  font-size: 22px;
  opacity: 0.5;
}

/* ---- Animations ---- */
@keyframes orgFadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.org-animate {
  animation: orgFadeInUp 0.5s ease forwards;
  opacity: 0;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .org-chart {
    min-width: 100%;
  }

  .org-branches {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .org-branches::before {
    display: none;
  }

  .org-branch-left,
  .org-branch-right {
    flex: none;
    width: 100%;
    max-width: 360px;
    padding-top: 0;
  }

  .org-branch-left::before,
  .org-branch-right::before {
    display: none;
  }

  .org-chart-wrapper {
    padding: 30px 16px 50px;
  }

  .org-chart-title h2 {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .org-card {
    min-width: 100%;
    max-width: 100%;
  }

  .org-coordinator-list .org-card,
  .org-coordinator-list-wrapper .org-card {
    min-width: 100%;
  }

  .org-chart-title h2 {
    font-size: 24px;
  }

  .org-role-title {
    font-size: 13px;
  }

  .org-card-name {
    font-size: 13px;
  }

  .org-card-photo,
  .org-card-photo-placeholder {
    width: 44px;
    height: 44px;
  }
}

/* ---- Scroll indicator for overflow ---- */
.org-chart-wrapper::after {
  content: '';
  position: sticky;
  right: 0;
  top: 0;
  width: 40px;
  height: 100%;
  pointer-events: none;
}
